package stage1.module3.homework4;

import java.util.ArrayList;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        ArrayList<Student> students = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        while(true){
            System.out.println("请输入操作指令");
            System.out.println("1添加学生");
            System.out.println("2修改学生信息");
            System.out.println("3删除学生");
            System.out.println("4查询学生");
            System.out.println("5打印所有学生信息");
            System.out.println("-1退出");
            int action = sc.nextInt();
            switch (action){
                case 1:
                    Add add = new Add(students);
                    break;
                case 2:
                    Modify m = new Modify(students);
                    break;
                case 3:
                    Delete d = new Delete(students);
                    break;
                case 4:
                    Search s = new Search(students);
                    break;
                case 5:
                    Traverse t = new Traverse(students);
                    break;
                case -1:
                    System.exit(0);
                    break;
            }

        }

    }

}
